package com.chengqs.rainbow.im.security.authentication.assembler;

import com.chengqs.rainbow.common.security.constant.SecurityConstants;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.Map;

/**
 * <B>主类名称：</B>TokenAssemblerFactory<BR>
 * <B>概要说明：</B>enter<BR>
 *
 * @author: chengqs
 * @create: 2025-09-15 21:22:37
 **/
@Component
public class TokenAssemblerFactory {

    @Resource
    private Map<String, TokenAssembler> tokenAssemblerMap;

    public TokenAssembler getAssembler(String grantType) {
        return tokenAssemblerMap.get(grantType + SecurityConstants.TOKEN_ASSEMBLER_POSTFIX);
    }

}
